namespace Code1
{
	using System;
	using System.Collections.Generic;
	using System.Text;
	using CodeFx.Web;
	using System.Collections;
	
	/// Classe de persistance pour les collections
	[Persistance("Mails"	, EPersistanceMode.Cache, EPersistanceLevel.Public)]
    public partial class PersistanceMails : Persistance<List<MailDAL>>
    {
        public new static PersistanceMails Current = new PersistanceMails();
		public override sealed void SetObject(List<MailDAL> ObjectToPersist)
        {
            base.SetObject(ObjectToPersist, "Mails");
        }
    }

	/// Classe de persistance pour la DAL
    [Persistance("Mail", EPersistanceMode.Cache, EPersistanceLevel.Public)]
    public partial class PersistanceMail : Persistance< MailDAL>
    {
        public new static PersistanceMail Current = new PersistanceMail();
        
		public override sealed string GetKey(MailDAL ObjectValue)
        {
            if (ObjectValue != null)
                return ObjectValue.Key;
            else
                return string.Empty ;
        }
		public override sealed MailDAL GetSelect(string Key)
        {
            return MailDTO.Select(Convert.ToUInt32(Key));
        }
    }
}